package com.izhengyin.gateway.base.constant;

/**
 * @author zhengyin zhengyinit@outlook.com
 * Created on 2020-01-14 16:46
 */
public enum Error {
    /**
     * 服务内部错误
     */
    SERVICE_ERROR(10001,"SERVICE_ERROR"),
    /**
     * 运行异常
     */
    RUNTIME_ERROR(10002,"RUNTIME_ERROR"),
    /**
     * 没有权限
     */
    ACCESS_FORBID(10003,"ACCESS_FORBID"),
    /**
     * 网关错误
     */
    GATEWAY_ERROR(10004,"GATEWAY_ERROR"),
    /**
     * 网关超时
     */
    GATEWAY_TIMEOUT(10005, "GATEWAY_TIMEOUT"),
    /**
     * 请求超时
     */
    REQUEST_TIMEOUT(10006, "REQUEST_TIMEOUT"),
    /**
     * 服务不可用
     */
    SERVICE_UNAVAILABLE(10007, "SERVICE_UNAVAILABLE"),
    /**
     * 服务为找到
     */
    SERVICE_NOT_FOUND(10008, "SERVICE_NOT_FOUND"),
    /**
     * 资源未找到
     */
    RESOURCE_NOT_FOUND(10009,"RESOURCE_NOT_FOUND");

    private int errno;
    private String error;
    private Error(int errno, String error) {
        this.errno = errno;
        this.error = error;
    }
    public String getError() {
        return this.error;
    }

    public void setError(String error) {
        this.error = error;
    }

    public int getErrno() {
        return this.errno;
    }

    public void setErrno(int erron) {
        this.errno = this.errno;
    }
}

